<%@ page language="java" import=" myUtils.Constants,myUtils.page.*,java.util.*,po.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:include value="/layout/header.jsp" />
<SCRIPT language="javascript" src="js/page-navigater.js"></SCRIPT>
<!-- B.1 MAIN CONTENT -->
<%
   Result result=(Result)request.getAttribute("result");
   List content=result.getContent();
   Page p=result.getPage();
   String right=(String)session.getAttribute("right");
   String status=(String)session.getAttribute("status");
%>


<div class="main-content">
    <!-- Content unit - One column -->
    <h1 class="block">社团列表</h1>
    <table>
            <tr><th class="top" scope="col">社团名称</th>
			<th class="top" scope="col"> 描述</th>
			<th class="top" scope="col">所属组织</th>
			<th class="top" scope="col">操作</th>
			</tr>


            <%for(int i=0;i<content.size();++i)
                {
                Organization org=(Organization)content.get(i);
                %>
          <tr><th scope="row"><%=org.getName()%></th><td><%=org.getDescription() %></td><td><%=org.getDepartment()%></td>
          <td><a href="getorg.action?id=<%=org.getId()%>"/>查看 </a>
          <%if(right.equals(String.valueOf(Constants.ORG_MANAGER))){%>
                       |<a href="deleteorg.action?id=<%=org.getId()%>"/> 删除 </a>
                       <%}%>
          </td></tr>
          <%}%>
   </table>

           <script language="javascript">pager = new PageNavigater(<%=p.getTotalPage() %>,<%=p.getCurrentPage() %>, "checkedorg.action?") ;document.write(pager);</script>
</div>
                
<s:include value="/layout/footer.jsp"/>